1ea8e3fdd3a5356190da4c9f72194e7068a8d10f,android_acm_serial/src/main/java/org/ros/android/android_acm_serial/AcmDevice.java,AcmDevice,AcmDevice,#UsbDeviceConnection#UsbInterface#,46
Before Change
public AcmDevice(UsbDeviceConnection usbDeviceConnection, UsbInterface usbInterface) {
Preconditions.checkNotNull(usbDeviceConnection);
Preconditions.checkNotNull(usbInterface);
Preconditions.checkState(usbDeviceConnection.claimInterface(usbInterface, true));
this.usbDeviceConnection = usbDeviceConnection;
this.usbInterface = usbInterface;
After Change
// like an ACM interface
UsbInterface usbInterface = null;
AcmUsbEndpoints acmUsbEndpoints = null;
for(int i=0;i<usbDevice.getInterfaceCount() && acmUsbEndpoints == null;i++) {
usbInterface = usbDevice.getInterface(i);
Preconditions.checkNotNull(usbInterface);
Preconditions.checkState(usbDeviceConnection.claimInterface(usbInterface, true));
acmUsbEndpoints = getAcmEndpoints(usbInterface);
}
if(acmUsbEndpoints == null) {